package com.qww;

public class Test08 {

    public static void main(String[] args) {
        DataOnly dataOnly = new DataOnly();
        System.out.println(dataOnly.i);  // 0
        System.out.println(dataOnly.d);  // 0.0
        System.out.println(dataOnly.b);  // 0.0
        dataOnly.i = 1;
        dataOnly.d = 10.0;
        dataOnly.b = 2.5;
        SomeClass some = new SomeClass();
        some.id = 20;
        dataOnly.some = some;
        System.out.println(dataOnly.i);  // 1
        System.out.println(dataOnly.d);  // 10.0
        System.out.println(dataOnly.b);  // 2.5
    }
}

class DataOnly {
    int i;
    double d;
    double b;
    SomeClass some;
}
class SomeClass {
    int id;
}